import React from "react";

export function useSearch() {


    /** 编辑时得客户id */
    // const id = searchParams.get('id');
    const [id, setId] = React.useState<string | null>(null);

    React.useEffect(() => {
        const searchParams = new URLSearchParams(window.location.search);
        const id = searchParams.get('id');
        setId(id);
    }, []);

    return {
        /** 客户id */
        id,
    }
}